package com.administrator.customviewtest.view.materia_design;

import android.animation.ObjectAnimator;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.ViewPropertyAnimator;
import android.widget.Button;
import android.widget.EditText;

import com.administrator.customviewtest.R;

/**
 * Created by Administrator on 2016/10/28.
 */


public class Test1 extends AppCompatActivity {
    private Button button;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test1);
        button = (Button) findViewById(R.id.id_btn_anim);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                ObjectAnimator.ofFloat(v,"x",0,720).setDuration(3000).start();
//                button.animate().alpha(0).x(720).setDuration(3000).start();

//                DialogUtil.getInstance(Test1.this,View.inflate(Test1.this,R.layout.layout_dialog,null)).show();
                DialogUtil.showDialog(Test1.this);
            }
        });


    }
}
